﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="TransferHistory.aspx.cs" Inherits="TransferHistory" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div class="post">
        <asp:Label ID="Label1" runat="server" Text="<%$Resources:Resource, transferhistory %>"></asp:Label>
        <div class="entry">
            <%if (Request.Cookies["username"] == null)
              { %>
            <asp:Label ID="Label5" runat="server" Text="You are not login!"></asp:Label>
            <%}
              else
              { %>
            <table style="width: 100%">
                <tr>
                    <td style="text-align: center; font-weight: 700; color: #FFFFFF; background-color: #0066FF;
                        font-size: large">
                        <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:Resource, historyinfo%>" />
                    </td>
                </tr>
                <tr>
                    <td style="font-size: x-small; text-align: center">
                        &nbsp;&nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center">
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                            AutoGenerateColumns="False" DataSourceID="HistorySqlDataSource" Width="100%">
                            <Columns>
                                <asp:BoundField DataField="MaTheGui" HeaderText="MaTheGui" SortExpression="MaTheGui" />
                                <asp:BoundField DataField="MaTheNhan" HeaderText="MaTheNhan" SortExpression="MaTheNhan" />
                                <asp:BoundField DataField="SoTien" HeaderText="SoTien" SortExpression="SoTien" />
                                <asp:BoundField DataField="ThoiGian" HeaderText="ThoiGian" SortExpression="ThoiGian" />
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
            <%} %>
        </div>
        <div>
            <asp:SqlDataSource ID="HistorySqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                SelectCommand="SELECT [MaTheGui], [MaTheNhan], [SoTien], [ThoiGian] FROM [ThanhToan] WHERE ([Username] = @Username)">
                <SelectParameters>
                    <asp:CookieParameter CookieName="username" Name="Username" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
        </div>
    </div>
</asp:Content>
